
// TLWebLedDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "afxcmn.h"


// CTLWebLedDlg dialog
class CTLWebLedDlg : public CDialogEx
{
// Construction
public:
	CTLWebLedDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_TLWEBLED_DIALOG };
#endif

public:
	CToolBar     m_wndToolBar;
	CStatusBar	 m_wndStatusBar;
	CProgressBar m_ProgressBar;

	CVSTab   m_VsTab;

	CDlgSysConfig* m_pDlgSysConfig;
	CDlgWebPost*   m_pDlgWebPost;
	CDlgBase64*    m_pDlgBase64;

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

public:
	BOOL CreateBars();
	void EnableToolBar(BOOL bEnable);

	void initVsTab();

	void InitCombo();
	void InitTreeCtrl();

	BOOL StartTcpServer();
	void startUdpServer();
	void startSerialPort();

	BOOL parseHttpPostContentToBmp(char* pszHttpPostContent);

	void resetPageItemComBox(int nPageCount);

// Implementation
protected:
	HICON m_hIcon;

	virtual void OnOK() {};
	virtual void OnCancel();
	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg LRESULT OnTipInfoNotify(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnHttpPostNotify(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnHttpRespNotify(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnSerialCommNotify(WPARAM wParam, LPARAM lParam);
	afx_msg void OnVSTabLButtonDown(NMHDR* pNMHDR, LRESULT*);
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButtonParse();
	//CComboBox m_cmbAlign;
	//CComboBox m_cmbColor;
	//CComboBox m_cmbFontSize;
	//CComboBox m_cmbFontType;
	CString m_strJson;
	CImgStatic m_imgLed;
	CHListBox m_List_Info;
	UINT m_nListenPort;
	afx_msg void OnTbMainStart();
	afx_msg void OnTbMainStop();
	CTreeCtrl m_TreeCtrl;
	afx_msg void OnBnClickedButtonEncodeBase64();
	afx_msg void OnBnClickedButtonDecodeBase64();
	afx_msg void OnBnClickedButtonSelectFile();
	CString m_strImgFile;
	afx_msg void OnTbMainLog();
	afx_msg void OnTbMainDebug();
	afx_msg void OnTbMainExit();
//	CTabCtrl m_VsTabCtrl;
	CTabCtrl m_TabCtrl;
	CComboBox m_cmbPage_Item;
	afx_msg void OnSelchangeComboPageItem();
	afx_msg void OnSelchangedTreectrl(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnCustomdrawTreectrl(NMHDR *pNMHDR, LRESULT *pResult);
};
